package com.weixin.sdk.util;

import com.alibaba.fastjson.JSONObject;

public class Menu {
    public static String MENU_CREATE = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=9_mNEYV2FV7XghDDc5Dh1i778cJeQjvAAXLVTGR_sYLl6usDM6Sj8oeeu6fhsDR8xmSG6FDvCZn8gOsntp5r8MjxsBqnzUjB92rJzvdKi1Qk-L6LwXCGU8-ztG7r9DsSBwAJ-WeOVu3FLhOkngYUTgAFAIED";
    public static void main(String[] args) {
        String jsonMenu = "{\"button\":[{\"name\":\"生活助手\",\"sub_button\":[{\"key\":\"11\",\"name\":\"天气预报\",\"type\":\"click\"},{\"key\":\"12\",\"name\":\"公交查询\",\"type\":\"click\"}]},{\"name\":\"音智达\",\"sub_button\":[{\"key\":\"21\",\"name\":\"好东西哦\",\"type\":\"click\"},{\"key\":\"22\",\"name\":\"人脸识别\",\"type\":\"click\"}]},{\"name\":\"更多体验\",\"sub_button\":[{\"key\":\"33\",\"name\":\"幽默笑话\",\"type\":\"click\"},{\"name\":\"View类型的\",\"type\":\"view\",\"url\":\"http://m.baidu.com\"}]}]}";
        JSONObject jsonObject = WeixinUtil.httpRequest(MENU_CREATE,"POST",jsonMenu);
        System.out.println(jsonObject.toJSONString());
    }
    public static class ClickButton{

    }
    public static class ViewButton{

    }
}
